package com.hpeu_12.day1225;

import java.util.Scanner;

/**
 * 第六题：编写一个方法，判断从键盘输入的年份是平年还是闰年
 * @author Administrator
 *
 */
public class HomeWork06 {
	public static int years;
	
	public static void year(int x) {
		if (((x % 4 == 0) && (x % 100 != 0)) || (x % 400 == 0)) {
			System.out.println("是闰年");
		}else {
			System.out.println("是平年");
		}
	}
	public static void main(String[] args) {
		HomeWork06 homeWork06 = new HomeWork06();
		System.out.println("请输入年份:");
		Scanner scanner = new Scanner(System.in);
		homeWork06.years = scanner.nextInt();
		year(years);

	}

}
